<%--
  Created by IntelliJ IDEA.
  User: 若兮
  Date: 2021/12/26
  Time: 19:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>加班签到情况</title>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="layui/css/layui.css">
</head>
<body class="layui-anim layui-anim-downbit">
<form class="layui-form" action="${pageContext.request.contextPath}/showClickOutCase" method="post">
    <div class="layui-table-tool">
        <div class="layui-input-inline"><input style="display: inline;width: 150px ;margin-left: 120px" type="month" class="layui-input" name="date" placeholder="yyyy-MM"></div>
        <button type="submit" class="layui-btn layui-btn-sm"><i class="layui-icon layui-icon-search"></i>查询
        </button>
        <a type="button" href="${pageContext.request.contextPath}/showAllOnWorkerByPage" class="layui-btn layui-btn-sm">上班签到情况</a>
        <input type="text" style="display: none" id="days" name="starts" autocomplete="off" lay-verify="required">

        <div class="layui-table-tool-self">
            <div class="layui-inline" title="筛选列" lay-event="LAYTABLE_COLS"><i class="layui-icon layui-icon-cols"></i>
            </div>
            <div class="layui-inline" title="导出" lay-event="LAYTABLE_EXPORT"><i
                    class="layui-icon layui-icon-export"></i>
            </div>
            <div class="layui-inline" title="打印" lay-event="LAYTABLE_PRINT"><i class="layui-icon layui-icon-print"></i>
            </div>
        </div>
    </div>
</form>
<form class="layui-form">
    <table class="layui-table">
        <colgroup>
            <col width="100">
            <col width="200">
            <col width="80">
            <col width="120">
            <col width="150">
            <col width="240">
            <col width="240">
            <col width="100">
        </colgroup>
        <thead>
        <tr>
            <th>编号</th>
            <th>员工姓名</th>
            <th>员工号</th>
            <th>职位</th>
            <th>部门</th>
            <th>加班时间</th>
            <th>结束时间</th>
            <th>签到情况</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${requestScope.workOutPg.list}" var="outWorkList">
            <tr>
                <td>${outWorkList.id}</td>
                <td>${outWorkList.ename}</td>
                <td>${outWorkList.eno}</td>
                <td>${outWorkList.job}</td>
                <td>${outWorkList.dName}</td>
                <td>${outWorkList.startimes}</td>
                <td>${outWorkList.endtimes}</td>
                <td>
                    <a type="button" class="layui-btn layui-btn-xs" href="#">签到情况</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>

    <c:if test="${requestScope.workOutPg.currentPage <= 1}">
        <button class="layui-btn layui-btn layui-btn-disabled" type="button">上一页</button>
    </c:if>

    <c:if test="${requestScope.workOutPg.currentPage > 1}">
        <a href="${pageContext.request.contextPath}/showAllOutWorkByPage?currentPage=${requestScope.workOutPg.currentPage-1}"
           class="layui-btn">上一页</a>
    </c:if>

    <c:if test="${requestScope.workOutPg.currentPage >= requestScope.workOutPg.totalPage}">
        <button class="layui-btn layui-btn layui-btn-disabled" type="button">下一页</button>
    </c:if>

    <c:if test="${requestScope.workOutPg.currentPage < requestScope.workOutPg.totalPage}">
        <a href="${pageContext.request.contextPath}/showAllOutWorkByPage?currentPage=${requestScope.workOutPg.currentPage+1}"
           class="layui-btn">下一页</a>
    </c:if>

</form>
</body>
<script type="text/javascript" src="layui/layui.js"></script>
<script type="text/javascript" src="js/jquery-3.6.0.js"></script>
<script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;

        //执行一个laydate实例
        laydate.render({
            elem: '#test1' //指定元素
        });
    });
</script>
</html>
